package com.h3c.gm.controller

import com.google.common.collect.Maps
import com.h3c.gm.common.Response
import com.h3c.gm.service.BusStorageStatisticsService
import org.springframework.web.bind.annotation.PathVariable
import org.springframework.web.bind.annotation.RequestMapping
import org.springframework.web.bind.annotation.RequestMethod
import org.springframework.web.bind.annotation.RestController

import javax.annotation.Resource

/**
 * Created by d14287 on 2017/7/18.
 */
@RestController
class BusStorageStatisticsController {

    @Resource
    BusStorageStatisticsService busStorageStatisticsService

    /**
     * 云硬盘状态统计，正常/异常/关闭/回收站
     */
    @RequestMapping(value = 'storage/status/statistics/{orgkey}', method = RequestMethod.GET)
    def getStarageStatusStatistics(@PathVariable(name = 'orgkey') String orgkey) {
        busStorageStatisticsService.getCountGroupByStatus(orgkey)
    }
}
